//密码匹配
export const passRule = (rule, value, callback) => {
  let reg = /^[a-zA-Z0-9]{4,11}$/;
  if (value === "") {
    callback(new Error("密码是必填项"));
  } else if (!reg.test(value)) {
    callback(new Error("密码格式不规范"));
  } else {
    callback();
  }
};